﻿using System.ComponentModel;

namespace Zuehlke.Blueprint.Quickstart.Architecture.Presentation.Services.Interfaces.BackgroundTasks
{
    /// <summary>
    /// Information about a background task.
    /// </summary>
    public interface IBackgroundTask : INotifyPropertyChanged
    {
        /// <summary>
        /// Gets a value indicating whether this instance is running.
        /// </summary>
        bool IsRunning { get; }
        
        /// <summary>
        /// Request the executing task to cancel.
        /// </summary>
        void RequestCancel();

        /// <summary>
        /// Determines whether this instance is cancelled.
        /// </summary>
        bool IsCancelled { get; }

        /// <summary>
        /// Reports the progress.
        /// </summary>
        void ReportProgress(int progress);

        /// <summary>
        /// Gets the progress (in percents).
        /// </summary>
        int Progress { get; }
    }
}